<template>
<van-tabbar v-model="active" @change="changeNav">
  	<van-tabbar-item icon="wap-home" to="/" >首页</van-tabbar-item>
  	<van-tabbar-item icon="contact" to="home">个人中心</van-tabbar-item>
</van-tabbar>
</template>
<script>
	import { Tabbar, TabbarItem } from 'vant';
	export default {
		components: {
			[Tabbar.name]: Tabbar,
			[TabbarItem.name]: TabbarItem,
		},
		data () {
			return {
				active : this.$store.getters.footer_active,
			}
		},
		methods:{
			changeNav(active){
				this.$store.dispatch('SET_FOOTER_ACTIVE',active);
			}
		}
	}
</script>
